function foo() {
    console.log(a+b)
    b=a
}
foo(2)